import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'

const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'array',
    component: () => import('@/views/daily-practice/array.vue')
  },
  {
    path: '/dailyPractice/promise',
    name: '/dailyPractice/promise',
    component: () => import('@/views/daily-practice/demoPromise.vue')
  },
  {
    path: '/dailyPractice/demots',
    name: '/dailyPractice/demots',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import('@/views/daily-practice/demoTs.vue')
  },
  {
    path: '/dailyPractice/debounce',
    name: '/dailyPractice/debounce',
    component: () => import('@/views/daily-practice/debounce.vue')
  },
  {
    path: '/dailyPractice/funcDemo',
    name: '/dailyPractice/funcDemo',
    component: () => import('@/views/daily-practice/funcDemo.vue')
  },
  {
    path: '/dailyPractice/generator',
    name: 'dailyPractice/generator',
    component: () => import('@/views/daily-practice/generator.vue')
  },
  {
    path: '/dailyPractice/MapSet',
    name: 'dailyPractice/MapSet',
    component: () => import('@/views/daily-practice/MapSet.vue')
  },
  {
    path: '/dailyPractice/extend',
    name: '/dailyPractice/extend',
    component: () => import('@/views/daily-practice/extends/extend.vue')
  },
  {
    path: '/dailyPractice/handleCode',
    name: 'dailyPractice/handleCode',
    component: () => import('@/views/daily-practice/handleCode/handleCode.vue')
  },
  {
    path: '/dailyPractice/observer',
    name: 'dailyPractice/observer',
    component: () => import('@/views/daily-practice/observer.vue')
  },
  {
    path: '/dailyPractice/cloneDemo',
    name: 'dailyPractice/cloneDemo',
    component: () => import('@/views/daily-practice/cloneDemo.vue')
  },
  {
    path: '/dailyPractice/styleHandle/threeStyle',
    name: 'dailyPractice/styleHandle/threeStyle',
    component: () => import('@/views/daily-practice/styleHandle/threeStyle.vue')
  },
  {
    path: '/dailyPractice/styleHandle/twoStyle',
    name: 'dailyPractice/styleHandle/twoStyle',
    component: () => import('@/views/daily-practice/styleHandle/twoStyle.vue')
  },
  {
    path: '/dailyPractice/styleHandle/imageLoad',
    name: 'dailyPractice/styleHandle/twoStyle',
    component: () => import('@/views/daily-practice/styleHandle/imageLoad.vue')
  },
  {
    path: '/dailyPractice/styleHandle/center',
    name: 'dailyPractice/styleHandle/center',
    component: () => import('@/views/daily-practice/styleHandle/center.vue')
  },
  {
    path: '/dailyPractice/ajaxDemo',
    name: 'dailyPractice/ajaxDemo',
    component: () => import('@/views/daily-practice/ajaxDemo.vue')
  },
  {
    path: '/dailyPractice/vueUse',
    name: 'dailyPractice/vueUse',
    component: () => import('@/views/daily-practice/vueUse.vue')
  },
  {
    path: '/dailyPractice/MapSet',
    name: 'dailyPractice/MapSet',
    component: () => import('@/views/daily-practice/MapSet.vue')
  },
  {
    path: '/dailyPractice/webWorker',
    name: 'dailyPractice/webWorker',
    component: () => import('@/views/daily-practice/webWorker/index.vue')
  },
  {
    path: '/headyWork/work/work1',
    name: 'headyWork/work/work1',
    component: () => import('@/views/heady-work/work/work1.vue')
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
